package mya.mes.mdc.constant;

import com.fasterxml.jackson.databind.JsonNode;
import mya.common.model.json.JsonHelper;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Test {
    public static void main(String[] args) throws IOException {

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        System.out.println(simpleDateFormat.format(new Date()));

//        String payload = " {\"DT\":\"2020-04-27 18:46:53\",\"813\":\"813\",\"814\":\"814\",\"815\":\"815\",\"816\":\"816\",\"817\":\"817\",\"818\":\"818\",\"819\":\"819\",\"820\":\"820\",\"821\":\"821\",\"822\":\"822\",\"823\":\"823\",\"824\":\"824\",\"825\":\"825\",\"826\":\"826\",\"827\":\"827\",\"828\":\"828\",\"829\":\"829\",\"830\":\"830\",\"831\":\"831\",\"832\":\"832\",\"833\":\"833\",\"834\":\"834\",\"835\":\"835\",\"836\":\"836\",\"837\":\"837\",\"838\":\"838\",\"839\":\"839\",\"840\":\"840\",\"841\":\"841\",\"842\":\"842\",\"843\":\"843\",\"844\":\"844\",\"845\":\"845\",\"846\":\"846\",\"847\":\"847\",\"848\":\"848\",\"849\":\"849\",\"850\":\"850\",\"851\":\"851\",\"852\":\"852\",\"853\":\"853\",\"854\":\"854\",\"855\":\"855\",\"856\":\"856\",\"857\":\"857\",\"858\":\"858\",\"859\":\"859\",\"860\":\"860\",\"861\":\"861\",\"862\":\"862\",\"863\":\"863\",\"864\":\"864\",\"865\":\"865\",\"866\":\"866\",\"867\":\"867\",\"868\":\"868\",\"869\":\"869\",\"870\":\"870\",\"871\":\"871\",\"872\":\"872\",\"873\":\"873\",\"874\":\"874\",\"875\":\"875\",\"876\":\"876\",\"877\":\"877\",\"878\":\"878\",\"879\":\"879\",\"880\":\"880\",\"881\":\"881\",\"882\":\"882\",\"883\":\"883\",\"884\":\"884\",\"885\":\"885\",\"886\":\"886\",\"887\":\"887\",\"888\":\"888\",\"889\":\"889\",\"890\":\"890\",\"891\":\"891\",\"892\":\"892\",\"893\":\"893\",\"894\":\"894\"}";
//        JsonNode jsonNode = JsonHelper.objectMapper.readTree(payload);
//
//        String topic = "GAP/EVENTS/AI";
//        String prefix = topic.substring(topic.length() - 2);
//        JsonNode AINode = jsonNode.get("DT");
//        System.out.println(AINode.toString());

//        String val = "2020-12-03 13:30";
//        val = val.split(" ")[1].split(":")[0];
//        System.out.println(val);


    }
}